package com.lishanyang.spring.biz;

import com.lishanyang.spring.dao.UserDAO;
import javax.annotation.Resource;

public class UserBizImplByAnnotationOfResource implements UserBiz{
    @Resource(name="userDAO")
    private UserDAO userDAO;

    @Resource(name="userDAO")
    public void setUserDAO(UserDAO userDAO) {
        this.userDAO = userDAO;
    }

    @Override
    public boolean login(String username, String password) {
        return userDAO.login(username,password);
    }

    @Override
    public void addUser(String username, String password) {
        userDAO.addUser(username,password);
    }

    @Override
    public void delUser(int id) {
        userDAO.delUser(id);
    }
}
